﻿namespace Traffic.Entity;

/// <summary>
/// 订单表
/// </summary>
public partial class OrderList
{
    public int Id { get; set; }

    /// <summary>
    /// SysAccount.ID
    /// </summary>
    public int FromSalesId { get; set; }

    /// <summary>
    /// 所属商户ID。对应Business.ID
    /// </summary>
    public int BusinessId { get; set; }

    /// <summary>
    /// 订单类型  0：终端机下单   1：小程序正常订单   2：小程序去程接送单  3：小程序回程接送单  4：小程序回程接送预约
    /// </summary>
    public int OrderType { get; set; }

    /// <summary>
    /// 订单唯一编号  yyyymmdd+FreID+thisFreNum+TodayOrderNum
    /// </summary>
    public string OrderNum { get; set; } = null!;

    /// <summary>
    /// 下单终端  微信网页、一体机、小程序
    /// </summary>
    public string FromTermin { get; set; } = null!;

    /// <summary>
    /// 用户ID，对应UserData.ID，终端默认为0.
    /// </summary>
    public int UserId { get; set; }

    /// <summary>
    /// 成人人数
    /// </summary>
    public int Adult { get; set; }

    /// <summary>
    /// 小孩人数
    /// </summary>
    public int Child { get; set; }

    /// <summary>
    /// 婴儿人数
    /// </summary>
    public int Baby { get; set; }

    /// <summary>
    /// 设备下单时获取的经纬度
    /// </summary>
    public string? DeviceLocation { get; set; }

    /// <summary>
    /// 设置下单时获取的地址
    /// </summary>
    public string? DeviceAddress { get; set; }

    /// <summary>
    /// 接送省份
    /// </summary>
    public string? PickupProvince { get; set; }

    /// <summary>
    /// 接送城市
    /// </summary>
    public string? PickupCity { get; set; }

    /// <summary>
    /// 接送镇区
    /// </summary>
    public string? PickupDistrict { get; set; }

    /// <summary>
    /// 旅客目的地
    /// </summary>
    public string? TargetAddress { get; set; }

    /// <summary>
    /// 联系人姓名
    /// </summary>
    public string? Contact { get; set; }

    /// <summary>
    /// 联系人电话
    /// </summary>
    public string? Mobile { get; set; }

    /// <summary>
    /// 行李件数
    /// </summary>
    public int LuggageCount { get; set; }

    /// <summary>
    /// 航班号
    /// </summary>
    public string? FlightNumber { get; set; }

    /// <summary>
    /// 预约地址
    /// </summary>
    public string? AppointAddress { get; set; }

    /// <summary>
    /// 预约时间
    /// </summary>
    public DateTime? AppointTime { get; set; }

    /// <summary>
    /// 接送司机姓名
    /// </summary>
    public string? DriverName { get; set; }

    /// <summary>
    /// 司机电话
    /// </summary>
    public string? DriverMobile { get; set; }

    /// <summary>
    /// 接送车牌
    /// </summary>
    public string? CarNo { get; set; }

    /// <summary>
    /// 上车地点
    /// </summary>
    public string? GetOn { get; set; }

    /// <summary>
    /// 目的地
    /// </summary>
    public string? GetOff { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreateDate { get; set; }

    /// <summary>
    /// 出发日期
    /// </summary>
    public DateTime? SetDate { get; set; }

    /// <summary>
    /// 订单完成时间
    /// </summary>
    public DateTime? CheckTime { get; set; }

    /// <summary>
    /// 占位数
    /// </summary>
    public int TotalSit { get; set; }

    /// <summary>
    /// 总站场服务费收费
    /// </summary>
    public decimal StationServicePrice { get; set; }

    /// <summary>
    /// 超出行李费
    /// </summary>
    public decimal OverLuggagePrice { get; set; }

    /// <summary>
    /// 接送费
    /// </summary>
    public decimal PickupPrice { get; set; }

    /// <summary>
    /// 总价
    /// </summary>
    public decimal TotalPrice { get; set; }

    /// <summary>
    /// 是否购买保险
    /// </summary>
    public bool NeedInsurance { get; set; }

    /// <summary>
    /// 保险公司
    /// </summary>
    public string? InsuranceCompany { get; set; }

    /// <summary>
    /// 保险产品名称
    /// </summary>
    public string? InsuranceProduct { get; set; }

    /// <summary>
    /// 保险产品单价
    /// </summary>
    public decimal InsuranceSinglePrice { get; set; }

    /// <summary>
    /// 购买保险产品总价
    /// </summary>
    public decimal InsuranceTotalPrice { get; set; }

    /// <summary>
    /// 订单状态  0：生成保存状态，待支付  1：已支付并成功减位  2：已验票上车   3：发起退票   4：退票成功  5：预约确认中
    /// </summary>
    public int OrderState { get; set; }

    /// <summary>
    /// 订单确认  默认1：确认  若OrderType=2预订车时，则需为0未确认，待操作人员人工确认。
    /// </summary>
    public bool OrderCheck { get; set; }

    /// <summary>
    /// 备订单注
    /// </summary>
    public string? Remarks { get; set; }

    /// <summary>
    /// 计调备注
    /// </summary>
    public string? CheckRemarks { get; set; }

    /// <summary>
    /// 订单状态  默认1正常  0：作废  1：正常
    /// </summary>
    public bool Status { get; set; }

    /// <summary>
    /// 服务评分
    /// </summary>
    public int ServicePoint { get; set; }

    /// <summary>
    /// 订单评价
    /// </summary>
    public string? Comment { get; set; }

    /// <summary>
    /// 对应机票订单号
    /// </summary>
    public string? FlightOrderNum { get; set; }

    /// <summary>
    /// 出行目的   差旅、旅游
    /// </summary>
    public string? GoOutPurpose { get; set; }

    /// <summary>
    /// 是否机票赠送免费车票 默认0：否  1：是
    /// </summary>
    public bool IsFreeOrder { get; set; }

    /// <summary>
    /// 预计上车时间
    /// </summary>
    public DateTime? GetOnTime { get; set; }

    /// <summary>
    /// 预计到达时间
    /// </summary>
    public DateTime? GetOffTime { get; set; }

    /// <summary>
    /// 是否去程  1：是  0：返
    /// </summary>
    public bool IsGo { get; set; }

    /// <summary>
    /// 是否已同步到南粤通
    /// </summary>
    public bool IsNanYueSync { get; set; }

    /// <summary>
    /// 南粤通订单号
    /// </summary>
    public string? NanYueOrderNum { get; set; }

    /// <summary>
    /// 单据来源  0：本系统   1：南粤通同步到本地
    /// </summary>
    public int? OrderWay { get; set; }
}
